<extend file='resource/view/mobile'/>
<block name="title">会员登录 - HDCMS开源免费三网系统</block>
<block name="content">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">会员登录</h3>
        </div>
        <div class="panel-body">

            <div class="tab-content">
                <div class="active tab-pane fade in" id="tab1">
                    <form action="" method="post">
                        <br/>
                        <div class="form-group">
                            <div class="col-sm-10">
                                <input type="text" name="username" class="form-control input-lg" placeholder="手机号/邮箱">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-10">
                                <input type="password" name="password" class="form-control input-lg" placeholder="密码">
                            </div>
                        </div>
                        <button class="btn btn-info btn-block btn-lg"> 立即登录</button>
                        <if value="IS_WEIXIN && v('site.wechat.level') gt 2">
                            <a href="{{web_url('reg/openidLogin')}}" class="btn btn-danger btn-block btn-lg"> 微信一键登录</a>
                        </if>
                    </form>
                    <br/>
                    <a href="{{web_url('reg/register')}}">用户注册</a>
                    <!--<a href="{{web_url('reg/retrieve')}}" class="pull-right">找回密码</a>-->
                </div>
            </div>
        </div>
    </div>
</block>
<style>
    #tab1 div {
        padding : 0px;
    }
</style>
<script>
    require(['util'], function (util) {
        $("form").submit(function () {
            var username = $.trim($("[name='username']").val());
            var password = $.trim($("[name='password']").val());
            var msg = '';
            if (username == '') {
                msg += "用户名不能为空<br/>";
            }
            if (password == '') {
                msg += "密码不能为空<br/>";
            }
            if (msg != '') {
                util.message(msg, '', 'error', {width: ''});
                return false;
            }
        })
    })
</script>